Object3D.MaterialCount Property
Read-Only
Syntax
MaterialCount as Material
Then number of materials in the object.